package entities;

import java.io.Serializable;
import java.lang.String;

import javax.persistence.*;

import ejb.HotelDTO;

/**
 * Entity implementation class for Entity: Hotel
 *
 */
@Entity
@Table(name="Hotel")
@NamedQueries({
	@NamedQuery(name= "Hotel.FIND_ALL", query="SELECT h FROM Hotel h ORDER BY h.idHotel ASC"),
	@NamedQuery(name= "Hotel.FIND_ONE", query="SELECT h FROM Hotel h WHERE h.idHotel=:id"),
	@NamedQuery(name= "Hotel.CANCELLA", query="DELETE FROM Hotel h WHERE h.idHotel=:id"),
	@NamedQuery(name= "Hotel.MODIFICA", query="UPDATE Hotel h SET h.nome=:nome, h.numeroStelle=:numeroStelle,"
			+ " h.prezzo=:prezzo WHERE h.idHotel=:id")
})
public class Hotel implements Serializable {

	   
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int idHotel;
	private String nome;
	private int numeroStelle;
	private int prezzo;
	private static final long serialVersionUID = 1L;
	
	public Hotel(HotelDTO hotel){
        this.nome = hotel.getNome();
        this.numeroStelle = hotel.getNumeroStelle();
        this.prezzo = hotel.getPrezzo();
    }

	public Hotel() {
		super();
	}   
	public int getIdHotel() {
		return this.idHotel;
	}

	public void setIdHotel(int IDHotel) {
		this.idHotel = IDHotel;
	}   
	public String getNome() {
		return this.nome;
	}

	public void setNome(String Nome) {
		this.nome = Nome;
	}   
	public int getNumeroStelle() {
		return this.numeroStelle;
	}

	public void setNumeroStelle(int numeroStelle) {
		this.numeroStelle = numeroStelle;
	}   
	public int getPrezzo() {
		return this.prezzo;
	}

	public void setPrezzo(int Prezzo) {
		this.prezzo = Prezzo;
	}
   
}
